package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriteStringDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("fos.txt",true);
//        String str = "我在成都的街头走一走，哦哦哦哦~";
//        byte[] data = str.getBytes(StandardCharsets.UTF_8);
//        fos.write(data);
//        fos.write("直到所有的灯都熄灭了也不停留。".getBytes(StandardCharsets.UTF_8));
        fos.write("成都~带不走的只有你.".getBytes(StandardCharsets.UTF_8));
        fos.close();
    }
}
